package com.mycompany.project.server.model;
import java.util.Calendar;
import java.util.GregorianCalendar;

public class TimeModel {
  private int hour;
  private int minute;
  private int second;
 
  public TimeModel(){

  }
  
  public TimeModel(int hour, int minut, int second){
	  this.hour=hour;
	  this.minute=minut;
	  this.second=second;
	 }

	public void setHour(int hour) {
		this.hour = hour;
	}
	
	public int getHour() {
		return hour;
	}
	
	public void setMinut(int minut) {
		this.minute = minut;
	}
	
	public int getMinut() {
		return minute;
	}
	
	public void setSecond(int second) {
		this.second = second;
	}
	
	public int getSecond() {
		return second;
	}

	public int getTime(){
		int time;
		Calendar calendar = new GregorianCalendar();
		this.hour=calendar.get(Calendar.HOUR);
		this.minute=calendar.get(Calendar.MINUTE);
		this.second=calendar.get(Calendar.SECOND);
        time = this.hour;
		return time;	
	}

}
